package com.csx.governance.traffic.adm.service;

import com.csx.governance.traffic.adm.model.bo.GrayscalePublishmentBO;
import com.csx.governance.traffic.adm.model.dto.GrayscalePublishmentDTO;
import com.csx.governance.traffic.adm.model.dto.StageTypeDTO;
import com.csx.governance.traffic.adm.model.dto.StrategyTypeDTO;

import java.util.List;

/**
 * 灰度发布服务
 * @author cuisongxu
 * @date 2023/5/4 14:15
 */
public interface GrayscalePublishService {

    /**
     * 获取灰度发布列表
     * @return 灰度发布列表
     */
    List<GrayscalePublishmentDTO> getGrayscalePublishments();

    /**
     * 根据发布名称获取灰度发布
     * @param publishmentName 发布名称
     * @return 灰度发布传输实体
     */
    GrayscalePublishmentDTO getGrayscalePublishment(String publishmentName);

    /**
     * 新增灰度发布
     * @param grayscalePublishmentBO 灰度发布业务实体
     */
    void addGrayscalePublishment(GrayscalePublishmentBO grayscalePublishmentBO);

    /**
     * 修改灰度发布
     * @param grayscalePublishmentBO 灰度发布业务实体
     */
    void updateGrayscalePublishment(GrayscalePublishmentBO grayscalePublishmentBO);

    /**
     * 删除灰度发布
     * @param publishmentNames 发布名称列表
     */
    void deleteGrayscalePublishments(List<String> publishmentNames);

    /**
     * 获取发布阶段类型
     * @return 发布阶段类型列表
     */
    List<StageTypeDTO> getStageTypes();

    /**
     * 获取 升级/回滚 策略类型列表
     * @return 升级/回滚 策略类型列表
     */
    List<StrategyTypeDTO> getStrategyTypes();
}
